package com.haruhinav.controller;

import com.haruhinav.entity.Notice;
import com.haruhinav.service.NoticeService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/api/notice")
public class NoticeController {

    @Resource
    private NoticeService noticeService;

//    所有公告
    @RequestMapping(value = "/a/all",method = RequestMethod.GET)
    public List<Notice> getAllNotice(){
        return noticeService.getAllNotice();
    }
}
